package com.jv.jdk;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class TestJdkProxy {
	public static void main(String[] args) {
		InvocationHandler handler = new MyJdkInvocationHandler(new UserDaoImpl());
		UserDao dao = (UserDao)Proxy.newProxyInstance(UserDao.class.getClassLoader(),new Class[]{UserDao.class},handler);
		dao.query();
	}
}
